<%= form_for(@user, html: {class: 'form-horizontal'}) do |f| %>
    <% if @user.errors.any? %>
      <div class="alert alert-dismissable alert-danger">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <h4>Warning!</h4>
        <strong><%= pluralize(@user.errors.count, "error") %> prohibited this promotion_mail from being saved:</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
        <% @user.errors.full_messages.each do |msg| %>
            <p><%= msg %></p>
        <% end %>
      </div>
    <% end %>

    <fieldset>
      <div class="form-group">
        <%= f.label :name, class: 'col-lg-2 control-label' %>
        <div class="col-lg-10">
          <%= f.text_field :name, class: 'form-control' %>
        </div>
      </div>
      <div class="form-group">
        <%= f.label :email, class: 'col-lg-2 control-label' %>
        <div class="col-lg-10">
          <%= f.email_field :email, class: 'form-control' %>
        </div>
      </div>
      <div class="form-group">
        <div class="col-lg-10 col-lg-offset-2">
          <div class="checkbox">
            <label>
              <%= f.check_box :subscribe %>
              Subscribe
            </label>
          </div>
        </div>
      </div>
      <div class="form-group">
        <%= f.label :user_group_id, class: 'col-lg-2 control-label' %>
        <div class="col-lg-10">
          <%= f.collection_select :user_group_id, @user_groups, :id, :name, {}, class: 'form-control' %>
        </div>
      </div>
      <div class="form-group">
        <%= f.label :last_sign_in, class: 'col-lg-2 control-label' %>
        <div class="col-lg-10">
          <div class="input-group date datetime-picker" data-date-format="YYYY-MM-DD HH:mm:ss">
            <!--<input type='text' class="form-control" />-->
            <%= f.text_field :last_sign_in, class: 'form-control' %>
            <span class="input-group-addon">
              <span class="glyphicon glyphicon-calendar"></span>
            </span>
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-lg-10 col-lg-offset-2">
          <%= f.submit class: 'btn btn-primary' %>
        </div>
      </div>
    </fieldset>
<% end %>
